package com.example.citypolitics.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    private static Logger logger = LoggerFactory.getLogger(TestController.class);

    @GetMapping("/mytest")
    public String test(@RequestParam(name = "t1", required = false) String t1) {
        logger.info("test1");
        logger.warn("test2");
        logger.error("test3");
        return "success";
    }
}
